package com.office.supplies.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.office.supplies.pojo.Sale;
import com.office.supplies.pojo.dto.SelectSaleListDTO;
import com.office.supplies.pojo.vo.SaleGoodsVO;
import com.office.supplies.pojo.vo.SaleListVO;

import java.util.List;

/**
 * @Author admin
 * @Description TODO
 * @Date 2023/12/12/12:57
 */
public interface SaleService extends IService<Sale> {

    /**
     * 获取所有商品信息和对应的库存
     *
     * @return List<SaleGoodsVO>
     */
    List<SaleGoodsVO> getGoodsListForSale();

    /**
     * 销售商品
     *
     * @param sale Sale
     */
    void saleGoods(Sale sale);

    /**
     * 查询销售订单
     *
     * @param pageNum Integer
     * @param pageSize Integer
     * @param selectSaleListDTO SelectSaleListDTO
     * @return PageInfo<SaleListVO>
     */
    PageInfo<SaleListVO> getSaleListByPageAndCondtion(Integer pageNum, Integer pageSize,
                                                      SelectSaleListDTO selectSaleListDTO);

    /**
     * 修改销售订单
     *
     * @param sale Sale
     */
    void updateSaleInfo(Sale sale);

    /**
     * 删除销售信息
     *
     * @param id Long
     */
    void deleteSaleInfo(Long id);

    void pass(Long id);

    void deleteSaleById(Long id);
}
